﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class listFilter : System.Web.UI.Page
{
    string id = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                id = Request.QueryString["func"].ToString();
                nhapDanhSach();
            }
        }
        catch {
            Response.Redirect("gioithieu.aspx");
        }
    }
    protected void nhapDanhSach()
    {
        clsTableAction clsTable = new clsTableAction("Page");
        clsTable.exportDataToGridviewPaging(0,5, ref GridView1, "*", " id_mn=" +  id);
        clsTable.free();
    }
    
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        clsTableAction clsTable = new clsTableAction("Page");
        clsTable.exportDataToGridviewPaging(e.NewPageIndex, 5, ref GridView1, "*", " id_mn=" + id);
        clsTable.free();
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
         if (e.Row.RowType == DataControlRowType.DataRow)
         {
             e.Row.Attributes.Add("onmouseover", "javascript:this.className = 'rowStyleHover'");
             e.Row.Attributes.Add("onmouseout", "javascript:this.className = 'rowStyle'");
         }
    }
}
